<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>个人信息</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<link rel="stylesheet" href="../css/common.css" />
		<style>
			* {
				margin: 0px;
				padding: 0px;
			}
			body {
				background-color: #FFFFFF;
			}
			.mui-content {
				background-color: #FFFFFF;
			}
			.mui-content>.mui-table-view:first-child {
			    margin-top: 0px;
			}
			.mui-table-view-cell:after {
				left: 0px;
			}
			.inline {
				display: inline-block;
			}
			.right {
				float: right;
			}
			.margin-l-r-10 {
				margin-left: 10px;
				margin-right: 10px;
			}
			.mui-table-view-cell .left img {
				width: 24px;
				height: 24px;
				vertical-align: middle;
			}
			.mui-table-view-cell .inline span {
				font-family: 'PingFangSC-Regular';
				font-size: 15px;
				color: #4C4C4C;
				margin-left: 5px;
			}
			.mui-table-view-cell .right img {
				width: 10px;
				height: 20px;
				vertical-align: middle;
				margin-left: 10px;
			}
			.mui-table-view-cell .right span {
				font-family: 'PingFangSC-Regular';
				font-size: 15px;
				color: #5BA9F9;
			}
			#travelMapKor, #travelMapJap {
				display: none;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">个人信息</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell" id="baseInfoMap" data-type="1">
					<div class="inline left margin-l-r-10">
						<span>基本信息</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="proMap" data-type="2">
					<div class="inline left margin-l-r-10">
						<span>职业经历</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="contactMap" data-type="9">
					<div class="inline left margin-l-r-10">
						<span>联系方式</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="eduMap" data-type="3">
					<div class="inline left margin-l-r-10">
						<span>教育经历</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="passportMap" data-type="4">
					<div class="inline left margin-l-r-10">
						<span>护照信息</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="familyMap" data-type="5">
					<div class="inline left margin-l-r-10">
						<span>家庭信息</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="travelMapKor" data-type="6">
					<div class="inline left margin-l-r-10">
						<span>旅行信息</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="travelMapJap" data-type="7">
					<div class="inline left margin-l-r-10">
						<span>旅行信息</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
				<li class="mui-table-view-cell" id="personMap" data-type="8">
					<div class="inline left margin-l-r-10">
						<span>紧急联系人</span>
					</div>
					<div class="inline right margin-l-r-10">
						<img src="../img/detail/go_more.png" />
					</div>
				</li>
			</ul>
			<div class="transaction-container"><button type="button">确定</button></div>
		</div>
	</body>
	<script type="text/javascript" src="../js/thirdparty/jquery-3.3.1.js" ></script>
	<script type="text/javascript" src="../js/thirdparty/mui.min.js" ></script>
	<script type="text/javascript" src="../js/thirdparty/spin.min.js" ></script>
	<script type="text/javascript" src="../js/utils/boot.js" ></script>
	<script type="text/javascript">
		var customerId = base.getParameter("customerId");
		var applyCustomerId = base.getParameter("applyCustomerId");
		var orderNo = base.getParameter("orderNo");
		var countryId = "";
		$(function() {
			iosPageRefresh();
			getOrderApplyTableDataInfoData();
		})
		$('.mui-table-view').on('tap', '.mui-table-view-cell', function() {
			window.localStorage.removeItem("isStepWrite"); //清除缓存的是否填写了申请表
			var typeID = $(this).data('type');
			switch (typeID){
				case 1:
					window.location.href = "personInfoDetail.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				case 2:
					window.location.href = "personInfoProfession.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				case 3:
					window.location.href = "personInfoEducation.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				case 4:
					parent.location.href = "personInfoPassport.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				case 5:
					parent.location.href = "personInfoFamily.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				case 6:
					parent.location.href = "personInfoTravelKorea.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId+"&countryId="+countryId;
					break;
				case 7:
					parent.location.href = "personInfoTravelJapan.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId+"&countryId="+countryId;
					break;
				case 8:
					parent.location.href = "personInfoContactJingji.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				case 9:
					parent.location.href = "personInfoContact.html?customerId="+customerId+"&applyCustomerId="+applyCustomerId;
					break;
				default:
					break;
			}
		});
		$('.transaction-container').on('tap', 'button', function() {
			setTimeout(function() {
				mui.back();
			}, 10)
		})
		function getOrderApplyTableDataInfoData() {
			base.setWait('正在获取数据');
			var url = base.url.getOrderApplyTableDataInfo;
			var params = {
				orderNo: orderNo,
			}	
			base.postData(url, params, function(data) {
				if (data.success) {
					if (data.extendData.baseInfoMap) {
						$('#baseInfoMap').show();
						if (data.extendData.baseInfoMap.isBaseInfo == 1) {
							$('#baseInfoMap').find(".right").prepend('<span>已完成</span>');
						}
						if (data.extendData.baseInfoMap.isContact == 1) {
							$('#contactMap').find(".right").prepend('<span>已完成</span>');
						}
					}else{
						$('#baseInfoMap').hide();
					}
					if (data.extendData.travelMap) {
						countryId = data.extendData.travelMap.countryId;
						if (data.extendData.travelMap.countryType == 1) {
							$('#travelMapJap').show();
							if (data.extendData.travelMap.isTravelInfo == 1) {
								$('#travelMapJap').find(".right").prepend('<span>已完成</span>');
							}
							$('#travelMapKor').hide();
						} else {
							$('#travelMapKor').show();
							$('#travelMapJap').hide();
						}
					} else{
						$('#travelMapKor').hide();
						$('#travelMapJap').hide();
					}
					if (data.extendData.passportMap) {
						$('#passportMap').show();
						if (data.extendData.passportMap.isPassportInfo == 1) {
							$('#passportMap').find(".right").prepend('<span>已完成</span>');
						}
					}else{
						$('#passportMap').hide();
					}
					if (data.extendData.proAndEduMap) {
						$('#proMap').show();
						if (data.extendData.proAndEduMap.isPro == 1) {
							$('#proMap').find(".right").prepend('<span>已完成</span>');
						}
						$('#eduMap').show();
						if (data.extendData.proAndEduMap.isEdu == 1) {
							$('#eduMap').find(".right").prepend('<span>已完成</span>');
						}
					}else{
						$('#proMap').hide();
						$('#eduMap').hide();
					}
					if (data.extendData.personMap) {
						$('#personMap').show();
						if (data.extendData.personMap.isEmergencyPersonInfo == 1) {
							$('#personMap').find(".right").prepend('<span>已完成</span>');
						}
					}else{
						$('#personMap').hide();
					}
					if (data.extendData.familyMap) {
						$('#familyMap').show();
						if (data.extendData.familyMap.isFamilyInfo == 1) {
							$('#familyMap').find(".right").prepend('<span>已完成</span>');
						}
					}else{
						$('#familyMap').hide();
					}
				} else {
					mui.toast(data.message);
				}
			}); 
		}
		function iosPageRefresh () { //ios页面返回当前页时强制刷新
			var isPageHide = false;   
			window.addEventListener('pageshow', function () {      
			    if (isPageHide) {        
			      window.location.reload();      
			    }    
			});    
			window.addEventListener('pagehide', function () {
			    isPageHide = true;    
			});
		}
	</script>
</html>